var Items = function(src) {
	this.name = "";
	this.color = "";
	this.x = 0;
	this.y = 0;
	this.width = 0;
	this.height = 0;
	// status to display or hide
	this.active = false;
	this.angle = 0;

	this.image = images[src];

	this.draw = function(graphic) {

		if (this.active) {
			if(this.name=="fireworks")
			{
				graphic.save();
				graphic.translate(parseInt(this.x), parseInt(this.y));
	
				graphic.rotate(this.angle);
				graphic.drawImage(this.image, -this.width / 2, -this.height/2,
						this.width, this.height);
	
				graphic.translate(-parseInt(this.y), -parseInt(this.y));
				graphic.restore();

			} else {
				graphic.save();
				graphic.translate(parseInt(this.x), parseInt(this.y));
	
				graphic.rotate(this.angle);
				graphic.drawImage(this.image, -this.width / 2, -this.height,
						this.width, this.height);
	
				graphic.translate(-parseInt(this.y), -parseInt(this.y));
				graphic.restore();
			}
		}
	};

};